package day16.晚间练习.组播;

import java.io.IOException;
import java.net.*;

public class ClinetDemo {
    public static void main(String[] args) throws IOException {
        DatagramSocket ds=new DatagramSocket();
        String s="hello,组播";
        byte[] bytes=s.getBytes();
        InetAddress address = InetAddress.getByName("224.0.1.0");
        int port=10002;
        DatagramPacket dp=new DatagramPacket(bytes,bytes.length, address,port);
   ds.send(dp);
   ds.close();
    }
}
